package com.zhuangxiaoyan.springboot.mybatis.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * OrderItem
 *
 * @author xjl
 * @version 2025/01/11 16:57
 **/
@Data
@EqualsAndHashCode
public class OrderItem {
    /**
     * 主键
     */
    private long id;

    /**
     * 数量
     */
    private int amount;

    /**
     * 单价
     */
    private BigDecimal price;

    /**
     * 订单id
     */
    private long orderId;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 修改时间
     */
    private Date gmtModify;

    /**
     * 版本号
     */
    private String version;

    /**
     * 扩展信息
     */
    private String extraInfo;

    /**
     * 商品id
     */
    private long productId;

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", product=" + productId +
                ", amount=" + amount +
                ", price=" + price +
                ", orderId=" + orderId +
                ", gmtCreate=" + gmtCreate +
                ", gmtModify=" + gmtModify +
                ", version='" + version + '\'' +
                ", extraInfo='" + extraInfo + '\'' +
                '}';
    }
}